const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const Webpack = require('webpack');

module.exports = {
  entry: {
    main: './src/index.js'
  },
  devtool: 'none',
  devServer: {
    contentBase: 'dist',
    port: 8000,
    hot: true,
    hotOnly: true
  },
  module: {
    rules: [{
      test: /\.css$/,
      loader: ['style-loader', 'css-loader']

    }]
  },
  plugins: [new HtmlWebpackPlugin({
    template: './src/index.html'
  }), new Webpack.HotModuleReplacementPlugin()],
  output: {
    path: path.resolve(__dirname, 'dist')
  }
}